<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script>
    let interId;
    onload = function () {
      interId=setInterval(jump,1000);
    }
    let time =5;
    function jump() {
      time--;
      let hid = document.getElementById("sid");
      hid.innerText=time;
      if(time==0) {
        clearInterval(interId);
        location.href="https://www.baidu.com"
      }
    }
  </script>
</head>
<body>
  <h1>支付成功，<span id="sid">5</span>秒后跳转到百度页面</h1>
</body>
</html>